<?php

namespace App\Supports\Payment;

use App\Supports\Payment\Contracts\PayChannel;
use App\Supports\Payment\Contracts\MethodPay;
use App\Supports\Payment\Contracts\MethodRefund;
use App\Supports\Payment\Contracts\MethodTransfer;
use App\Supports\Payment\Contracts\MethodCallback;

class PayBase
{
	protected $channel;
	
	/**
	 * @var MethodPay | MethodRefund | MethodTransfer | MethodCallback
	 */
	protected $method;
	
	public function __construct(PayChannel $channel)
	{
		$this->channel = $channel;
	}
	
	public function setMethod(object $method)
	{
		$this->method = $method;
		$this->method->setChannel($this->channel);
		return $this;
	}
}
